<template>
	<view>
		<view class="container">
			<view class="head">
				<swiper :indicator-dots="indicatorDots" :indicator-color="indicatorColor"
					:indicator-active-color="indicatorActiveColor" :autoplay="autoplay" :interval="interval"
					:duration="duration">
					<swiper-item>
						<view>
							<image src="@/static/banner01.jpg" mode="widthFix"></image>
						</view>
					</swiper-item>
					<swiper-item>
						<view>
							<image src="@/static/banner02.jpg" mode="widthFix"></image>
						</view>
					</swiper-item>
					<swiper-item>
						<view>
							<image src="@/static/banner03.jpg" mode="widthFix"></image>
						</view>
					</swiper-item>
				</swiper>
			</view>
		</view>
		<view style="width: 100vw; height: 30vh; display: flex;justify-content: center;
		align-items: center;">
			<view class="content">
				<view class="consultation" @click="tz('/pages/consultation/consultation')">
					<text>心理咨询</text>
				</view>
				<view class="character">
					<view class="test" @click="tz('/pages/test/test')">
						<text>测试</text>
					</view>
					<view class="trends" @click="tz('/pages/article/article')">
						<text>动态列表</text>
					</view>
				</view>
			</view>
		</view>
		<view style="width: 100vw; height: 15vh; display: flex;justify-content: center;
		align-items: center;">
			<view class="foot">
				<view class="decompression" @click="tz('/pages/relax/relax')">
					<text>解压室</text>
				</view>
				<view class="load" @click="tz('/pages/index/loading')">
					<text>loading</text>
				</view>
				<view class="book" @click="tz('/pages/book/book')">
					<text>书籍</text>
				</view>
				<view class="bookshelf" @click="tz('/pages/bookshelf/bookshelf')">
					<text>书架</text>
				</view>
			</view>
		</view>

	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				indicatorDots: true,
				autoplay: true,
				interval: 3000,
				duration: 500,
				indicatorColor: "#292b40",
				indicatorActiveColor: "#ffffff",
			};
		},
		methods: {
			tz(page){
				uni.navigateTo({
					url: page
				})
			}
		}
	};
</script>

<style>
	.container {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}

	.head {
		width: 90vw;
		height: 20vh;
	}

	.head image {
		width: 100%;
		max-height: 20vh;
	}

	.content {
		margin-top: 6vh;
		display: flex;
		width: 90vw;
		height: 30vh;
	}

	.content text {
		font-weight: bold;
		font-size: 30px;
	}

	.consultation {
		/* flex: 1; */
		width: 50%;
		height: 100%;
		border: 0px;
		outline: none;
		border-radius: 5%;
		background-image: url('https://img.tukuppt.com/ad_preview/00/82/37/60ebae526493c.jpg!/fw/780');
		background-size: 100% 100%;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.character {
		flex: 1;
		display: flex;
		flex-direction: column;
		margin-left: 2vw;
		/* 		justify-content: center;
		align-items: center; */
	}

	.test {
		flex: 1;
		/* 		width: 100%;
		height: 50%; */
		border: 0px;
		outline: none;
		border-radius: 5%;
		background-image: url('https://seopic.699pic.com/photo/40244/9595.jpg_wh1200.jpg');
		background-size: 100% 100%;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.trends {
		flex: 1;
		border: 0px;
		outline: none;
		border-radius: 5%;
		background-image: url('https://seopic.699pic.com/photo/40219/3544.jpg_wh1200.jpg');
		background-size: 100% 100%;
		margin-top: 2vh;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.foot {
		display: flex;
		width: 90vw;
		height: 11vh;
		margin-top: 6vh;
		justify-content: space-around;
	}
	
	.foot text{
		font-weight: bold;
		font-size: 20px;
/* 		color: #732BF5; */
	}

	.decompression {
		flex: 1;
		border: 0px;
		outline: none;
		border-radius: 5%;
		background-image: url('https://seopic.699pic.com/photo/30657/6137.jpg_wh1200.jpg');
		background-size: 100% 100%;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.load {
		flex: 1;
		border: 0px;
		outline: none;
		border-radius: 5%;
		background-image: url('https://seopic.699pic.com/photo/30641/1592.jpg_wh1200.jpg');
		background-size: 100% 100%;
		margin-left: 2vw;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.book {
		flex: 1;
		border: 0px;
		outline: none;
		border-radius: 5%;
		background-image: url('https://seopic.699pic.com/photo/50062/1999.jpg_wh1200.jpg');
		background-size: 100% 100%;
		margin-left: 2vw;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.bookshelf {
		flex: 1;
		border: 0px;
		outline: none;
		border-radius: 5%;
		background-image: url('https://seopic.699pic.com/photo/30231/7988.jpg_wh1200.jpg');
		background-size: 100% 100%;
		margin-left: 2vw;
		display: flex;
		justify-content: center;
		align-items: center;
	}
</style>